package com.lanhai.zhonglai.enums;

 
/**
 * 对接设备传输模式定义
 * @author zhengwei
 *
 */
public enum TransDirectionEnum {
	OnlyIn(1),
	OnlyOut(2),
	Both(3);
	
	
	TransDirectionEnum(int i) {
		pos=i;
	}

	private int pos;

	public int getPos() {
		return pos;
	}

	public void setPos(int pos) {
		this.pos = pos;
	}
	
	
	public static TransDirectionEnum getTransDirectionEnum(int b) {
		TransDirectionEnum p=null;
		switch(b) {
		case 1:
			p=TransDirectionEnum.OnlyIn;
			break;
		case 2:
			p=TransDirectionEnum.OnlyOut;
			break;
		case 3:
			p=TransDirectionEnum.Both;
			break;
		 default:
				p=TransDirectionEnum.Both;
				break;
		}
		return p;
	}
}